<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
</head>
<body>
<form th:action="@{/users/search}" method="post">
  查询条件：
  <table width="100%" border=1>
    <tr>
      <td>姓名:<input type="text" name="user.name"></td>
      <td>电话号码:<input type="text" name="user.phoneNumber"></td>
      <td>最低薪水:<input type="text" name="salaryMin"></td>
      <td>最高薪水:<input type="text" name="salaryMax"></td>
    </tr>
    <tr>
      <td><input type="submit" value="查询"/></td>
    </tr>
  </table>
</form>
<form th:action="@{/users/delete}" method="post">
  <a th:href="@{/users/add}">新增</a>
  <input type="submit" value="删除"/><br/>
  商品列表：
  <table width="100%" border=1>
    <tr>
      <th><input type="checkbox" name="allid"/></th>
      <td>姓名</td>
      <td>体重</td>
      <td>电话号码</td>
      <td>邮箱</td>
      <td>生日</td>
      <td>薪水</td>
      <td>操作</td>
    </tr>
          <tr th:each="item : ${pageInfo.list}">
            <th><input type="checkbox" name="ids" th:value="${item.id}"/></th>
            <td th:text="${item.name }"></td>
            <td th:text="${item.weight}"></td>
            <td th:text="${item.phoneNumber}"></td>
            <td th:text="${item.email}"></td>
            <td th:text="${#temporals.format(item.birthday,'yyyy-MM-dd')}"></td>
            <td th:text="${item.salary}"></td>
            <td>
              <img th:src="@{/users/download(id=${item.id })}" width="200" height="200"/>
            </td>
            <td>
              <a th:href="@{/users/findById(id=${item.id})}">修改</a>
              <a th:href="@{/users/delete(ids=${item.id})}">删除</a>
            </td>
          </tr>
  </table>
  <div>
    页次：<span th:text="${pageInfo.pageNum}">1</span>/<span th:text="${pageInfo.pages}">1</span>&nbsp;每页<span th:text="${pageInfo.pageSize}">1</span>&nbsp;总数<span th:text="${pageInfo.total}">1</span>&nbsp;&nbsp;&nbsp;&nbsp;
    <a th:href="@{/users/page(pageNo=1)}">首页</a>
    &nbsp
    <span th:if="${!pageInfo.isFirstPage}">
            <a th:href="@{/users/page(pageNo=${pageInfo.pageNum-1})}">上一页</a>
        </span>
    &nbsp;
    <span th:if="${!pageInfo.isLastPage}">
            <a th:href="@{/users/page(pageNo=${pageInfo.pageNum+1})}">下一页</a>
        </span>
    <a th:href="@{/users/page(pageNo=${pageInfo.pages})}">尾页</a>
  </div>

</form>
</body>
</html>